<?php
namespace Common\Model;
use Think\Model;

class InfoShareModel extends Model{

	public function addRecord($fid){
		$data['info_id'] 		= $fid;
		$return = $this->add($data);
		return $return;
	}

	public function getList(){
		$p = I('p',0,'int');
		$limit = C('DEFALUT_PAGE_SIZE');
		$startNum = $p * $limit;
		$count = $this->field("count(*) as count")->find();
		$data = $this->limit($startNum,$limit)->select();
		return array(
			'count' => $count['count'],
			'data'  => $data
		);
	}

}
